package org.framework.test.controller;

import org.framework.test.entity.Producer;
import org.framework.test.service.ConsumerService;
import org.framework.test.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * <p>Title:ConsumerController.java</p >
 * <p>Description: </p >
 * <p>Copyright: Copyright(c)2020</p >
 * <p>Date:2021/5/29 15:03</p >
 *
 * @author quzp
 * @version 1.0
 */
@RestController
@RequestMapping(value = {"/consumer"})
public class ConsumerController {

    @Autowired
    private ConsumerService service;

    /**
     * 通过feign调用的测试接口
     * @return
     */
    @GetMapping(value = {"/feignMethod"})
    public CommonResult<Producer> feignMethod(){
        return service.feignMethod();
    }
}